Having 2 event handlers for onMenuToggle means
double-counting popup openings, which breaks
the highlight guided tour prompt schedule.
Bug: T164228
Change-Id: Ia6855e6b07e1364ff76c2bccd82c33b21b82619b
/**
* List displaying all filter groups
*
/**
* List displaying all filter groups
*
- * @extends OO.ui.Widget
+ * @extends OO.ui.MenuTagMultiselectWidget
* @mixins OO.ui.mixin.PendingElement
*
* @constructor
* @mixins OO.ui.mixin.PendingElement
*
* @constructor
itemUpdate: 'onModelItemUpdate',
highlightChange: 'onModelHighlightChange'
} );
itemUpdate: 'onModelItemUpdate',
highlightChange: 'onModelHighlightChange'
} );
- this.menu.connect( this, { toggle: 'onMenuToggle' } );
// Build the content
$contentWrapper.append(
// Build the content
$contentWrapper.append(
* @param {boolean} isVisible Menu is visible
*/
mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onMenuToggle = function ( isVisible ) {
* @param {boolean} isVisible Menu is visible
*/
mw.rcfilters.ui.FilterTagMultiselectWidget.prototype.onMenuToggle = function ( isVisible ) {
+ // Parent
+ mw.rcfilters.ui.FilterTagMultiselectWidget.parent.prototype.onMenuToggle.call( this );
+
- mw.hook( 'RcFilters.popup.open' ).fire( this.getMenu().getSelectedItem() );
+ mw.hook( 'RcFilters.popup.open' ).fire();
if ( !this.getMenu().getSelectedItem() ) {
// If there are no selected items, scroll menu to top
if ( !this.getMenu().getSelectedItem() ) {
// If there are no selected items, scroll menu to top
}
} else {
// Clear selection
}
} else {
// Clear selection
- this.getMenu().selectItem( null );
this.selectTag( null );
}
};
this.selectTag( null );
}
};